package com.devshephard.business;

import org.springframework.context.ApplicationListener;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;

@Component
public class MyApplicationListener implements ApplicationListener<MyApplicationEvent> {
    @Override
    public void onApplicationEvent(MyApplicationEvent event) {

        System.out.println("接收到事件1："+event.getClass());
    }

    @EventListener
    public void handleReviewCadFileOpenEvent(MyApplicationEvent event) {
        System.out.println("接收到事件2："+event.getClass());
    }
}
